//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef __APCluster_h__
#define __APCluster_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "libraries.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class APCluster {

    private:

        double**      dataPoints;
        double*       preferencePoint;
        int*          idx;

        int           numberDataPoints;
        int           numberPreference;
        int           numberClusters;

        //Parameters
        int           maxits;
        int           convits;
        double        dampfact;
        bool          noise;

        bool          convCluster;

    protected:

        void    AddNoiseDataPoint();      //####

        bool    SymetricDataPoints();     
        double  RealMinDataPoint();       
        double  RealMaxDataPoint();       

        bool    AddPreferenceDiagonal();  
        bool    GetTransposedMatrix(double**, int);

        double* GetColumnMatrix(double**, int, double*, int);
        double* GetRowMatrix(double**, int, double*, int);

        bool    AssignVector(double*, double*, int);
        bool    MaxInVector(double*, int, double&, int&);

    public:

        APCluster();
        APCluster(const APCluster&);
        APCluster(APCluster*);
        
        ~APCluster();

        void      DataPoints(double**, int);
        void      PreferencePoint(double*, int);
        
        void      NumberClusters(int);

        void      Maxits(int);
        void      Convits(int);
        void      Dampfact(double);
        void      Noise(bool);

        double**  DataPoints();
        double*   PreferencePoint();
        int*      Idx();
        
        int       NumberDataPoints(void);
        int       NumberPreferences(void);
        int       NumberClusters(void);
        
        int       Maxits(void);
        int       Convits(void);
        double    Dampfact(void);
        bool      Noise(void);
        bool      ConvCluster();

        bool      ComputeAPCluster(int);
        //bool      ComputeAPClusterSparse();

        //APCluster operator=(const APCluster&);

};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
